var selectNode;
var parentNode;
var rootNode;
var categorytree = new eiTreeModel('ZMCD10');
var isAddedRefresh = true;
var treeObj;
//启动事件处理
$(document).ready(function() {
	efregion.show('ef_region_inqu');
	$("#_left").resizable({
		handles: "e",
		 iframeFix: true,  
		 stop: function( event, ui ) {
			 $("#_right").css("margin-left",  $("#_left").outerWidth());
		 }
	});
});
efform_onload = function ()
{ 
};
function reloadCurrentNode()
{ 
	if(selectNode!=null)selectNode.reload(); 
}
function configTree(tree) {
	  tree.emptyNodeAsLeaf = false;
	  tree.activeEmptyJudger = false;
	  tree.topNodeActive = false;
	  tree.nodeInitializer = treeNodeInitializer;
	  tree.initialExpandDepth = 1;
      tree.hideRoot = true;
      treeObj = tree;
      tree._rootNode.active(true);
} 
function treeNodeInitializer(node) {
	if ( node.top() )
	{ 
		rootNode=node;
	    node.active(true);
	    node.textClicked = function(){ };
	    return;
	} 
	
    node.textClicked = function(){ 
    	selectNode = node;
    	parentNode=node.parent(); 
		var str= new Array();   
		str=node.data().label.split("-");  
        var args="fdSuperDirId="+str[0];
        var type=str[1]; 
        args+="&fdDirType="+encodeURI(type);
        args=encodeURI(args);	
        if(type=="公用目录")
        {
            ef.get("_right_iframe").src="DispatchAction.do?efFormEname=ZMCD11&"+args;  
        }else
        {
        	ef.get("_right_iframe").src="DispatchAction.do?efFormEname=ZMCD13&"+args;  
        }
    };
} 